--[[/**
-- * 
 * 强行修改攻击目标
-- */]]

---@class BuffEffect174102 : BaseBuffEffect
BuffEffect174102 = ClientFight.CreateClass("BuffEffect174102", ClientFight.BaseBuffEffect)
local t = BuffEffect174102

---@param fight Fight
---@param buff FighterBuff
function t:action(fight, buff, ...)
    local buffEffectValue = buff.buffBean.f_BuffEffectValue;
    local id = buffEffectValue[1];
    local tag = buffEffectValue[2];
    local ruleSelector = TargetRuleSelector.valueOf(id);
    if (ruleSelector == nil) then
        return IBuffEffect.REMOVE;
    end
    local target = buff.target;
    target.updateSkillTargetRuleSelectorByBuff(buff.id, ruleSelector, tag);
    SkillRoleMgr.savePathFile("[" .. fight.getFrame() .. "][EFFECT]Fighter " .. buff.getTarget().getFighterId() .. " Buff:"
            .. buff.getModelId() .. " buff 强制改变下次技能的 目标选择规则为含有 标记 : " .. tag);

    return ClientFight.BaseBuffEffect.action(self, fight, buff, ...);
end
function t:remove(fight, buff, force, ...)
    local target = buff.target;
    target.removeSkillTargetRuleSelectorByBuff(buff.id);
    return ClientFight.BaseBuffEffect.remove(self, fight, buff, force, ...);
end
t.New()